package demo3;

interface shape{
     int h=666;
    public  abstract void drow();
    default public  void test(){
        System.out.println("用default修饰的抽象方法");
    }

    public static void fun(){
        System.out.println("接口中的静态方法");
    }
}

class circle implements shape{
    @Override
    public void drow() {
        System.out.println("⚪⚪⚪⚪⚪⚪⚪⚪⚪");
    }

    @Override
    public void test() {
        System.out.println("circle中重写的test方法");
        //shape.super.test();
    }
}

public class javaTest {
    public static void drow(shape shape1){
        shape1.drow();
    }
    public static void main(String[] args) {
        //利用接口实现多态
        drow(new circle());
        new circle().test();
        //接口中的方法
        shape.fun();
        System.out.println(shape.h);
    }
}
